﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Green.ObjectPickUper
{
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
    public class CollectionPickUperAttribute : PickUpBaseAttribute
    {
        /// <summary>
        /// 是否删除to中不存在于from中的item项
        /// </summary>
        public bool IsDeleteNotInFromItem
        { get; set; }

        public bool IsConvertTo
        { get;  set; }

        public bool IsConvertFrom
        { get;  set; }

        /// <summary>
        /// fromObjItem list和domainObjItem list相等的表达式（fromObjItem,domainObjItem）=>retun bool;
        /// </summary>
        public string EqualExpression
        {
            get;
            set;
        }

        public CollectionPickUperAttribute()
        {
            this.IsDeleteNotInFromItem = this.IsConvertFrom = this.IsConvertTo = true;
        }
    }
}
